//
//  list.cpp
//  宿舍管理系统
//
//  Created by 孟强定 on 2020/6/27.
//  Copyright © 2020 mqd. All rights reserved.
//

#include <stdio.h>
#include "AllStudent.hpp"
#include "AllBuilding.hpp"

AllStudent allStudents;
AllBuilding allBuildings;
void printBlank();
std::string toString(int x, int num); //将数字转成字符串, 不足num未前面补零.

void printBlank(){
    for(int i=0;i<3;i++) printf("\n");
}

std::string toString(int x,int num){
    std::string s="";
    while(x){
        s=char(x%10+'0')+s;
        x/=10;
    }
    while(s.size()<num) s='0'+s;
    return s;
}

void toRoom(std::string& s, int room[]){
    room[0]= s[0]-'0'-1;
    room[1]= s[2]-'0'-1;
    room[2]= (s[3]-'0')*10+s[4]-'0'-1;
}
